package com.example.springbootlearn.controller;

import cn.hutool.core.lang.Dict;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author libo
 * @Date 2023/2/27 21:51
 */

@Slf4j
@RequiredArgsConstructor
@RequestMapping("tlog")
@RestController
public class TestTLogController {
    
    @GetMapping("Dict/{ids}")
    public Object findByIDict(@PathVariable List<Long> ids) {
        return Dict.create().put("a", ids);
    }


    @GetMapping("testid")
//    @TLogAspect({"id"})
    public void demo1(String id, String name) {
        log.info("这是第一条日志");
        log.info("这是第二条日志");
        log.info("这是第三条日志");
        new Thread(() -> log.info("这是异步日志")).start();
    }
}
